package com.qiyu.canal.client;

import com.alibaba.otter.canal.protocol.CanalEntry;
import com.google.protobuf.InvalidProtocolBufferException;

import java.util.List;

/**
 * @Author idea
 * @Date created in 10:08 上午 2020/8/2
 */
public interface CanalHandler {

    /**
     * 处理binlog里面所有的entry
     *
     * @param entryList
     * @throws Exception
     */
    void dataHandle(List<CanalEntry.Entry> entryList) throws Exception;

    /**
     * 处理entry单个项
     *
     * @param entry
     * @return
     */
    Object dataEntryHandle(CanalEntry.Entry entry)  throws InvalidProtocolBufferException ;
}

